To date, a server hosting a web page or application typically has provided to a client machine, most commonly in the clear, all of the code that may be required to be executed at the client depending on how the client is used to interact with the web page and/or application. Current web pages and applications, therefore, typically suffer from having a large part of their source code easily exposed at the client-side. For example, web pages may incorporate client-side scripting in their associated HTML files or as include files that can be readily downloaded from an associated server. The source code associated with the implementation of a page or application is typically included in a few files and/or in small pieces inside the associated HTML page and is usually stored on disk at the client-side. The code is often in plain text and is only compiled by an associated browser as needed at the client. As a result, the source code associated with the implementation of a page or application is easily decipherable by anyone who has access to the files associated with the code at the client-side. This code, however, is valuable intellectual property that requires the investment of time and money by the creators.
One existing method for obfuscating the source code associated with a page or application is to parse through the source code and strip out comments and unneeded white spaces and to covert variable and function names to shortened versions. While this makes it more difficult to decipher, de-parsing the downloaded obfuscated code files to determine the underlying source code is still possible.
Therefore, there exists a need for an improved technique to protect client-side code.